Meaning of the word "it takes one to know one" in English

What does "it takes one to know one" mean in English? Explore the meaning, pronunciation, and specific usage of this word with Lingoland.

it takes one to know one

US /ɪt teɪks wʌn tu noʊ wʌn/
UK /ɪt teɪks wʌn tu nəʊ wʌn/
"it takes one to know one" picture

Idiom

used to say that someone must have the same bad quality as the person they are criticizing

Example:
"You're being very selfish!" "Well, it takes one to know one!"
He called me a liar, but it takes one to know one.